#include <STC15F2K60S2.H>
 code unsigned char tab[] = { 0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0xff};//数码管0-9
 unsigned char dspuf[22,22,22,22]
void displa()
{
	//wei xuan
P2=((P2&0x1F)|0xc0);
P0=(1<<i);
P2&=0x1F;

 P2=((P2&0x1F)|0xe0);
P0 = 0xff;
P2&=0x1F;

P2=((P2&0x1F)|0xe0);
P0=0xc0 ;//tab[dspbuf[i]];
if(i==2)
{
	P0=(tab[dspbuf[i]])&0x7f;
}
P2&=0x1F;



i++;
if(i==8)
{i=0;}
}